<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>
    <textarea cols="30" rows="10">
          用户协议
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Temporibus tenetur repudiandae ipsa adipisci assumenda dignissimos magni, nobis blanditiis itaque laboriosam reprehenderit recusandae! Aperiam earum temporibus sed at quis laboriosam ullam.
    Lorem ipsum dolor sit amet consectetur, adipisicing elit. Temporibus tenetur repudiandae ipsa adipisci assumenda dignissimos magni, nobis blanditiis itaque laboriosam reprehenderit recusandae! Aperiam earum temporibus sed at quis laboriosam ullam.
    </textarea><br>
    <button disabled></button>
    <script>
        let i=5
        let btn=document.querySelector('button')
        let n=setInterval(function(){
            i--
            btn.innerHTML=`阅读用户协议(${i})`
            if(i===0){
                btn.disabled=false
                btn.innerHTML='同意'
                clearInterval(n)
            }
        },1000)
    </script>
</body>

</html>